function [ObjectsToMatch,ObjCalcProps]=AddObjectToMatchGroup(ObjectsToMatch,ObjCalcProps,CP,previousObjectNumber,PrevBestMatchTraj)
%previousObjectNumber
%index=find([ObjectsInCurrentFrame(previousObjectNumber).traj.trajNumber]==PrevBestMatchTraj);
ToRemoveFromActive=ObjCalcProps{previousObjectNumber}(:,CP.trajNumber)==PrevBestMatchTraj;

ObjCalcProps{previousObjectNumber}(ToRemoveFromActive,CP.active)=0;
%ObjectsInCurrentFrame(previousObjectNumber).active(ObjectsInCurrentFrame(previousObjectNumber).trajNumber==PrevBestMatchTraj)=0;
ObjectsToMatch(end+1)=previousObjectNumber;

